@import './variables.scss';
// 公共类方法

// 校验失败样式
.error-reg{
	color: #f00;
	text-align: right;
	font-size: 24rpx;
	padding-right: 24rpx;
}

// placeholder相关样式
:deep(.placeholder-right){
	text-align: right;
	font-size: 28rpx;
}

:deep(.uni-input-placeholder){
		color: #86909c !important;
}

.uni-inputs {
  color: #86909c !important;
}

// 表单必填样式
.isrequired{
	&::before{
	  content: '*';
	  color: #f00;
	  padding-right: 10rpx;
		font-weight: bold;
  }
}

// 	缺省页样式
.uv-empty{
  // position: fixed; 
  top: 0;         
  left: 0;        
  width: 100%;    
  height: 100%;  
  z-index: 100; 
  display: flex;  
  justify-content: center;
  align-items: center;
}

// 文本样式
@mixin textStyleBase {
  color: $text-color;
  font-size: $font-size-base;
}
@mixin titleStyleBase {
  color: $text-color;
  font-size: $font-size-lg-base;
  font-weight: 500;
}
// 按钮颜色
@mixin btnBg {
  background-color: $btn-bg-color;
  color: #fff;
}

/* flex布局 */
@mixin flex(
  $align: null,
  $justify: null,
  $flex-column: null,
  $flex-wrap: null
) {
  display: flex;
  @if ($align != null) {
    align-items: $align;
  }
  @if ($justify != null) {
    justify-content: $justify;
  }
  @if ($flex-column != null) {
    flex-direction: $flex-column;
  }
  @if ($flex-wrap != null) {
    flex-wrap: $flex-wrap;
  }
}

/* 绝对定位  参数顺序：上右下左 */
@mixin positionAbsolute($top: null, $right: null, $bottom: null, $left: null) {
  position: absolute;
  @if ($left!= '' & & $left!=null) {
    left: $left;
  }
  @if ($right!= '' & & $right!=null) {
    right: $right;
  }
  @if ($top!= '' & & $top!=null) {
    top: $top;
  }
  @if ($bottom!= '' & & $bottom!=null) {
    bottom: $bottom;
  }
}

/* 圆形盒子 */
@mixin circle($size: 11px, $bg: #fff) {
  border-radius: 50%;
  width: $size;
  height: $size;
  line-height: $size;
  text-align: center;
  background: $bg;
}

/* 文本格式化，超出范围，显示省略号 */
@mixin text-overflow($line: 1) {
  @if ($line == 1) {
    white-space: nowrap;
  }
  overflow: hidden;
  -webkit-line-clamp: $line;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

// 公共函数

/* 计算多个以上的数字    width: sum(50px，30px，100px); */
@function sum($numbers...) {
  $sum: 0;
  @each $number in $numbers {
    $sum: $sum + $number;
    @return $sum;
  }
}
